//
//  ZSLTestViewController.swift
//  micro_blog
//
//  Created by Mac on 16/9/20.
//  Copyright © 2016年 Mac. All rights reserved.
//

import UIKit

class ZSLTestViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        view.backgroundColor = UIColor.magenta
        
        
        addNavRightButton()
    }
    

    private func addNavRightButton() {
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "push", target: self, action: #selector(pushAction))
        
    }
    
    //  点击事件
    func pushAction() -> Void {
        let test = ZSLTestViewController()
        navigationController?.pushViewController(test, animated: true)
        
        
    }


    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
